@keyframes chuckOneAnimation {
  from {
    transform: rotate(45deg) translate(0px, 0px);
  }

  30% {
    transform: rotate(47deg) translate(-3px, 5px);
  }

  60% {
    transform: rotate(50deg) translate(-3px, -5px);
  }

  to {
    transform: rotate(45deg) translate(0px, 0px);
  }
}

@keyframes chuckTwoAnimation {
  from {
    transform: rotate(35deg) translate(0px, 0px);
  }

  30% {
    transform: rotate(33deg) translate(0px, -6px);
  }

  60% {
    transform: rotate(35deg) translate(0px, -12px);
  }

  to {
    transform: rotate(33deg) translate(0px, 0px);
  }
}

$_width: 600px;
$_min_width: 300px;

.login-and-register-container {
  width: 100%;
  height: 100vh;
  overflow: hidden;
  position: relative;

  .animation-chuck {
    position: absolute;
    width: 300px;
    height: 300px;
    background-color: var(--backColor-simple);
    border: 1px solid var(--lineColor);
    border-radius: 8px;
    /* 开始执行动画之前等待的时间量 */
    animation-delay: 0ms;
    /* 设置动画是应正向播放、反向播放还是在正向和反向之间交替播放 */
    animation-direction: alternate;
    /* 完成一个动画周期所需的时间 */
    animation-duration: 5s;
    /* 画在执行之前和之后如何将样式应用于其目标 */
    animation-fill-mode: none;
    /* 设置动画序列在停止前应播放的次数 */
    animation-iteration-count: infinite;
    animation-timing-function: ease-in-out;
  }

  .animation-chuck-one {
    top: -60px;
    left: -75px;
    transform: rotate(45deg) translate(0px, 0px);
    animation-name: chuckOneAnimation;
  }

  .animation-chuck-two {
    top: 85%;
    left: 65%;
    transform: rotate(35deg) translate(0px, 0px);
    animation-name: chuckTwoAnimation;
  }

  .outer-container {
    width: calc($_width + 20px);
    min-width: calc($_min_width + 20px);
    height: 100vh;
    padding: 0 10px;

    .inner-container {
      width: $_width;
      min-width: $_min_width;
      aspect-ratio: 4 / 2.5;
      border-top-right-radius: 10px;
      border-bottom-left-radius: 10px;
      background-color: var(--backColor);
      border: 1px solid var(--lineColor);
      position: relative;
    }

    .title {
      width: 100%;
      height: 50px;
      line-height: 50px;
      text-align: center;
      color: var(--textColor);
    }

    .content {
      width: 100%;
      height: calc(100% - 50px);
      border-bottom-left-radius: 10px;
      overflow: hidden;
      padding: 0 10%;
      display: flex;
      flex-direction: column;
      gap: 30px;
      padding-top: 30px;
      position: relative;
    }
  }
}

// Android & ios
@media screen and (max-width: 450px) {
  .login-and-register-container {
    .outer-container {
      .container {
        width: 90%;
        height: 60vh;
        display: flex;
        flex-direction: column;
        justify-content: center;

        .title {
          font-size: 30px;
        }

        .cont {
          width: 90%;
        }
      }
    }
  }
}
